home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / GRAPHICS.SWG / 0138_Flame Code.pas < prev    next >
Pascal/Delphi Source File  |  1995-03-03  |  2KB  |  48 lines

  1. { From: 9308920@info.umoncton.ca (DEGRACE KEITH) }
  2.  
  3. var
  4.   c, x, y : byte;
  5.  
  6. procedure setrgb(c, r, g, b : byte);
  7. begin
  8.   port[$3c8] := c;   { g'day, this is a probably the most simple version   }
  9.   port[$3c9] := r;   { of fire that you will ever see in pascal. i wrote   }
  10.   port[$3c9] := g;   { the code in pascal so it's slow and choppy, i have  }
  11.   port[$3c9] := b;   { another version in asm. and it's faster. anyways if }
  12. end;                 { you have any critics or question on this code, just }
  13.                      { e-mail me at ekd0840@bosoleil.ci.umoncton.ca. or    }
  14. begin                {              9323767@info.umoncton.ca               }
  15.   randomize;         {  note : I have code for all kinds of stuff (that I  }
  16.   asm   mov ax, 13h  {         wrote of course), if you want something     }
  17.         int 10h      {         e-mail me (i never get mail), maybe i have  }
  18.   end;               {         what you want.                              }
  19.   for x := 1 to 32 do{                               keith degrâce         }
  20.    begin             {                               moncton, n.-b. canada }
  21.     setrgb(x, (x shl 1)-1, 0, 0 );
  22.     setrgb(x+32, 63, (x shl 1)-1, 0 );
  23.     setrgb(x+64, 63, 63, (x shl 1)-1 );
  24.     setrgb(x+96, 63, 63, 63 );
  25.    end;
  26.   repeat
  27.    for x := 0 to 159 do
  28.     begin
  29.      for y := 30 to 101 do
  30.       begin
  31.        c := (mem[$a000:(y shl 1)*320+(x shl 1)]+
  32.              mem[$a000:(y shl 1)*320+((x+1) shl 1)]+
  33.              mem[$a000:(y shl 1)*320+((x-1) shl 1)]+
  34.              mem[$a000:((y+1) shl 1)*320+((x+1) shl 1)]) shr 2;
  35.        if c <> 0 then dec(c);
  36.        memw[$a000:(((y-1) shl 1)*320+(x shl 1))] := (c shl 8) + c;
  37.        memw[$a000:(((y shl 1)-1)*320+(x shl 1))] := (c shl 8) + c;
  38.       end;
  39.      mem[$a000:(y shl 1)*320+(x shl 1)] := random(2)*160;
  40.     end;
  41.   until port[$60] < $80;
  42.   asm  mov ax, 3
  43.        int 10h
  44.   end;
  45. end.
  46.  
  47.  
  48.